﻿using ECMS.Infrastructure.Domain;
using System;
using System.Collections.Generic;
using System.Text;

namespace ECMS.Domain.Models
{
    /// <summary>
    /// 回复贴
    /// </summary>
    public class Reply : EntityCore
    {
        /// <summary>
        /// 帖子ID
        /// </summary>
        public int ForumId { get; set; }
        /// <summary>
        /// 帖子
        /// </summary>
        public virtual Forum _Forum { get; set; }

        /// <summary>
        /// 回复内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 点赞
        /// </summary>
        public int Hot { get; set; }
        /// <summary>
        /// 回复人ID
        /// </summary>
        public int AppUserId { get; set; }

        //public virtual AppUser _AppUser { get; set; }
        /// <summary>
        /// 审核人
        /// </summary>
        public int SysUserId { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime AuditTime { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int Status { get; set; }
        protected override void Validate()
        {
            //if (string.IsNullOrEmpty(Mobile))
            //    AddBrokenRule(new BusinessRule(nameof(Mobile), "手机号不能为空."));
            //if (string.IsNullOrEmpty(Password))
            //    AddBrokenRule(new BusinessRule(nameof(Password), "登录密码不能为空."));
        }
    }
}
